<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"
	contentType="text/html; charset=UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>合众人寿公益平台客户管理系统</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<SCRIPT type="text/javascript">
	      var GB_ROOT_DIR = "<%=request.getContextPath()%>/html/skin/";
        </SCRIPT>
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<link href="<%= request.getContextPath() %>/html/css/Main.css"
			rel="stylesheet" type="text/css" />
		<link href="<%=request.getContextPath()%>/html/css/gb_styles.css"
			rel="stylesheet" type="text/css" />
			<link href="<%=request.getContextPath()%>/html/js/My97DatePicker/skin/WdatePicker.css"
			rel="stylesheet" type="text/css" />
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/html/js/AJS.js"></script>
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/html/js/AJS_fx.js"></script>
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/html/js/gb_scripts.js"></script>
		<script src="<%=request.getContextPath()%>/html/js/Calendar.js"
			charset="utf-8"></script>
			<script src="<%=request.getContextPath()%>/html/js/My97DatePicker/WdatePicker.js"
			charset="utf-8"></script>
		<!-- Dwr Js -->
		<script
			src="<%= request.getContextPath() %>/dwr/interface/organizationAction.js"
			type="text/javascript"></script>
		<script src="<%= request.getContextPath() %>/dwr/engine.js"
			type="text/javascript"></script>
		<script src="<%= request.getContextPath() %>/dwr/util.js"
			type="text/javascript"></script>
		<script src="<%= request.getContextPath() %>/html/js/subCityUtil.js"
			type="text/javascript"></script>

		<style>
body,ul,ol,dl,dd,p,h1,h2,h3,h4,h5,h6,form,input,textarea,select,td,th {
	margin: 0;
	padding: 0;
	font-family: "宋体", Arial, Helvetica, sans-serif;
}

li {
	list-style: none;
}

input {
	background: none;
}

.clear {
	zoom: 1;
}

.clear:after {
	content: "";
	display: block;
	clear: both;
}

#subCityHiden {
	display: none;
}
</style>


	</head>

	<body>
		<input type="hidden" value="${impDataInfor}" id="impDataInfor">
		<div class="container">
			<div class="wrap clear">
				<div class="sub_wp_right">
					<div class="rt_tt">
						<h3 class="tittle">
							爱心之旅活动列表
						</h3>
					</div>
					<div class="ct">
						<form
							action="<%=request.getContextPath()%>/journeyLove/searchJourneyLoves.do"
							method="post" name="listForm" onsubmit="check()">
							<h3 class="sm_tt">
								查询条件
							</h3>

							<div class="tiaojian" id="tiaojian">
								<ul class="clear">
								 
									<li>
										<span>分公司：</span>
										<select name="journeyLove.subCompany" onchange="ajaxSubmit()"
											id="subCompany">
											<option selected="selected" value="No">
												不限
											</option>
											<s:iterator value="#session.barchList" var="organ">
												<option value="<s:property value="#organ.um_organ_id" />"
													<c:if test="${journeyLove.subCompany eq organ.um_organ_id }">selected</c:if>>
													<s:property value="#organ.abbr_name" />
												</option>
											</s:iterator>
										</select>
									</li>
									<li>
										<span>中支：</span>
										<select name="journeyLove.subCity" id="subCity">
											<option selected="selected" value="No">
												不限
											</option>
								 				<s:iterator value="#session.expensedList" var="organ">
												<option value="<s:property value="#organ.um_organ_id" />"
													<c:if test="${journeyLove.subCity eq organ.um_organ_id }">selected</c:if>>
													<s:property value="#organ.abbr_name" />
												</option>
											  </s:iterator>  
										</select>
										<input type="hidden" value="${subCityHidden}"  name="subCityHidden" id="subCityHidden" />
									</li>
									<li>
										<span>活动时间：</span>
										<input type="text" name="startDate" id="startDate"
											value="${startDate}" onfocus="WdatePicker({startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" readonly="readonly"/>
									</li>
									<li>
										<span>至：</span>
										<input type="text" name="endDate" id="endDate"
											value="${endDate}" onfocus="WdatePicker({endDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" readonly="readonly"/>
									</li>
									
									<li>
										<span>OA审批号：</span>
										<input type="text" name="journeyLove.oaSph" value="${journeyLove.oaSph }">
									</li>

								</ul>
								<div class="btn">
									<input type="submit" value="查询" name = "search" onclick="setButtonType(this)"/>
								</div>
                                  <input type="hidden" id="buttonType" name="buttonType">
							</div>
							<div class="btn2">
								<input type="button" value="添加爱心之旅"
									onclick="location=('<%=request.getContextPath()%>/journeyLove/toSaveJourneyLove.do')">
								<input type="button" value="批量导入"
									onclick="location=('<%=request.getContextPath()%>/jsp/journeyLove/impJourneyLoves.jsp')" />
								<input type="button" value="批量导出" name="exp" onclick="setButtonType(this)" />
							</div>
							<s:property
								value="@com.ulic.customerManApplication.pager.PagerTag@getStart('爱心之旅活动列表', #request.pm)"
								escape="false" />
							<div class="jieguo">
								<table border="0" cellpadding="0" cellspacing="0"
									class="listArea" width="100%">
									<thead>
										<tr>
											<th>
												时间
											</th>
											<th>
												分公司
											</th>
											<th>
												操作机构
											</th>
											<th>
												捐助学生人数
											</th>
											<th>
												捐助金额
											</th>
											<th>
												绿卡会员
											</th>
											<th>
												银卡会员
											</th>
											<th>
												金卡会员
											</th>
											<th>
												铂金卡会员
											</th>
											<th>
												钻石卡会员
											</th>
											<th>
												自驾车辆数
											</th>
											<th>
												活动经费
											</th>
											<th>
												会员总计
											</th>
											<th>
												OA审批号
											</th>
											<th>
												操作
											</th>
											<th>

											</th>
										</tr>
									</thead>
									<tbody id="bg">
										<s:if test="#request.pm.datas.size()==0">
											<tr>
												<td colspan="14" align="center">
													<font color="red">暂无数据！</font>
												</td>
											</tr>
										</s:if>
										<s:else>
											<s:iterator value="#request.pm.datas" var="journeyLove"
												status="status">
												<s:if test="#status.odd == true">
													<tr class="rowNormal"
														onmouseover="this.className='rowChecked'"
														onmouseout="this.className='rowNormal'">
												</s:if>
												<s:else>
													<tr class="rowAlternate"
														onmouseover="this.className='rowChecked'"
														onmouseout="this.className='rowAlternate'">
												</s:else>
												<td align="center">
													<s:property value="#journeyLove.activityDate" />
												</td>
												<td width="110px">
													<div class="autoSubComName"
														title="<s:property value="#journeyLove.subComName" />">
														<s:property value="#journeyLove.subComName" />
													</div>
												</td>
												<td width="100px">
													<div class="autoSubCityName"
														title="<s:property value="#journeyLove.subCityName" />">
														<s:property value="#journeyLove.subCityName" />
													</div>
												</td>
												<td align="center">
													<s:property value="#journeyLove.donateStuNum" />
												</td>
												<td align="center">
													<s:property value="#journeyLove.donateMoney" />
												</td>
												<td align="center">
													<s:property value="#journeyLove.greenCardMember" />
												</td>
												<td align="center">
													<s:property value="#journeyLove.silverCardMember" />
												</td>
												<td align="center">
													<s:property value="#journeyLove.goldenCardMember" />
												</td>
												<td align="center">
													<s:property value="#journeyLove.platinumCardMember" />
												</td>
												<td align="center">
													<s:property value="#journeyLove.diamondCardMember" />
												</td>
												<td align="center">
													<s:property value="#journeyLove.selfDrivings" />
												</td>
												<td align="center">
													<s:property value="#journeyLove.activityFee" />
												</td>
												<td align="center">
													<s:property
														value="#journeyLove.greenCardMember+#journeyLove.platinumCardMember+#journeyLove.diamondCardMember+#journeyLove.silverCardMember+#journeyLove.goldenCardMember" />
												</td>
												<td align="center">
													<s:property value="#journeyLove.oaSph" />
												</td>
												<td align="center">
													<a
														href="<%=request.getContextPath()%>/journeyLove/viewJourneyLove.do?journeyLove.id=<s:property value="#journeyLove.id"/>">查看</a>
													<a
														href="<%=request.getContextPath()%>/journeyLove/updateJourneyLove.do?journeyLove.id=<s:property value="#journeyLove.id"/>">修改</a>
													<a
														href="javascript:deleteJourneyLove(<s:property value="#journeyLove.id"/>);">删除</a>
													<br>
													<a
														href="<%=request.getContextPath()%>/subMember/searchSubMembers.do?journeyLoveId=<s:property value="#journeyLove.id"/>">会员</a>
													<a
														href="<%=request.getContextPath()%>/subStudent/searchSubStudents.do?journeyLoveId=<s:property value="#journeyLove.id"/>">学生</a>
													<a
														href="<%=request.getContextPath()%>/subAchievement/searchSubAchievements.do?journeyLoveId=<s:property value="#journeyLove.id"/>">成果</a>
												</td>
												</tr>
											</s:iterator>
											<tr class="rowAlternate"
												onmouseover="this.className='rowChecked'"
												onmouseout="this.className='rowAlternate'">
												<td align="center">
													总计
												</td>
												<td colspan="2" align="center">
													共
													<s:property value="#request.pm.total" />
													场爱心之旅活动
												</td>
												<td align="center">
													<s:property value="#request.journeyLoveVO.totalDonateStu" />
												</td>
												<td align="center">
													<s:property value="#request.journeyLoveVO.totalDonateMon" />
												</td>
												<td align="center">
													<s:property value="#request.journeyLoveVO.totalGreenMem" />
												</td>
												<td align="center">
													<s:property value="#request.journeyLoveVO.totalSilMem" />
												</td>
												<td align="center">
													<s:property value="#request.journeyLoveVO.totalGoldMem" />
												</td>
												<td align="center">
													<s:property value="#request.journeyLoveVO.totalPlanMem" />
												</td>
												<td align="center">
													<s:property value="#request.journeyLoveVO.totalDiamMem" />
												</td>
												<td align="center">
													<s:property value="#request.journeyLoveVO.totalselfDri" />
												</td>
												<td align="center">
													<fmt:formatNumber value="${journeyLoveVO.totalActFee}" pattern="0.00"/>
												</td>
												<td align="center" colspan="3">
													产生会员总数
													${journeyLoveVO.totalGreenMem+journeyLoveVO.totalSilMem+journeyLoveVO.totalGoldMem+journeyLoveVO.totalPlanMem+journeyLoveVO.totalDiamMem}
													位
												</td>
											</tr>
										</s:else>
									</tbody>
								</table>
							</div>
							<s:property
								value="@com.ulic.customerManApplication.pager.PagerTag@getEnd2(#request.pm)"
								escape="false" />
						</form>
					</div>
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript">
	<%
	 String rolename = (String)session.getAttribute("rolename");
	 if(!"THIRDADMIN".equals(rolename)){
	%>
    ajaxSubmit();
    <%}%>
    
    function deleteJourneyLove(id){
  		if(confirm("是否确认删除？")){
  			window.location.href="<%=request.getContextPath()%>/journeyLove/deleteJourneyLove.do?journeyLove.id="+id;
  		}
  	}
  	var impDataInfor = document.getElementById("impDataInfor").value;
  	if(impDataInfor != ''){
  		 GB_showCenter("导入爱心之旅信息","<%=request.getContextPath()%>/jsp/journeyLove/impDataInfor.jsp?impDataInfor=${impDataInfor}",300,300);
  		document.getElementById("impDataInfor").value = '';
  	}
  </script>
</html>
